package com.ruoyi.userr.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 会员订单（记录支付和有效期）对象 vip_orders
 * 
 * @author sr
 * @date 2025-08-17
 */

public class VipOrders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    private Integer id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 套餐ID（关联vip_plans.id） */
    @Excel(name = "套餐ID", readConverterExp = "关=联vip_plans.id")
    private String planId;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 实际支付金额 */
    @Excel(name = "实际支付金额")
    private BigDecimal payAmount;

    /** 支付渠道（1-微信，2-支付宝） */
    @Excel(name = "支付渠道", readConverterExp = "1=-微信，2-支付宝")
    private Long payChannel;

    /** 支付状态（0-未支付，1-已支付，2-已退款） */
    @Excel(name = "支付状态", readConverterExp = "0=-未支付，1-已支付，2-已退款")
    private Long payStatus;

    /** 会员生效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "会员生效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 会员到期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "会员到期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 是否自动续费（1-是） */
    @Excel(name = "是否自动续费", readConverterExp = "1=-是")
    private Integer isAutoRenew;

    /** 是否删除：0正常 1删除 */
    private Integer del;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setPlanId(String planId) 
    {
        this.planId = planId;
    }

    public String getPlanId() 
    {
        return planId;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setPayAmount(BigDecimal payAmount) 
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() 
    {
        return payAmount;
    }

    public void setPayChannel(Long payChannel) 
    {
        this.payChannel = payChannel;
    }

    public Long getPayChannel() 
    {
        return payChannel;
    }

    public void setPayStatus(Long payStatus) 
    {
        this.payStatus = payStatus;
    }

    public Long getPayStatus() 
    {
        return payStatus;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setIsAutoRenew(Integer isAutoRenew) 
    {
        this.isAutoRenew = isAutoRenew;
    }

    public Integer getIsAutoRenew() 
    {
        return isAutoRenew;
    }

    public void setDel(Integer del) 
    {
        this.del = del;
    }

    public Integer getDel() 
    {
        return del;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("planId", getPlanId())
            .append("orderNo", getOrderNo())
            .append("payAmount", getPayAmount())
            .append("payChannel", getPayChannel())
            .append("payStatus", getPayStatus())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("isAutoRenew", getIsAutoRenew())
            .append("createTime", getCreateTime())
            .append("del", getDel())
            .toString();
    }
}
